package cn.tedu.submarine;

import javax.swing.*;

/**
 * 水雷潜艇类
 */
public class MineSubmarine extends SeaObject implements EnemyLife{

    /**
     * 构造方法 设置水雷的宽和高
     */
    public MineSubmarine(){
        super(63,19);
    }

    public void move() {
        x += speed;
    }

    public ImageIcon getImage() {
        return Images.minesubm;
    }

    /**
     * 发射水雷----生成水雷对象
     * @return 返回水雷对象
     */
    public Mine shootMine(){
        return new Mine(this.x + this.width,this.y - 11);
    }

    public int getLife(){
        return 1;
    }

}
